<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>记负债</title>
	</head>
	<body>
		<form th:action="@{/doaddliab}" method="post">
			<div class="form-group">
				<label>是否从下个月开始计算</label>
				<div class="form-check form-check-inline">
					<input class="form-check-input" type="radio" name="nextMonthStart"
						value="0">
						<label class="form-check-label">否</label>
				</div>
				<div class="form-check form-check-inline">
					<input class="form-check-input" type="radio" name="nextMonthStart"
						value="1">
						<label class="form-check-label">是</label>
				</div>
			</div>
			<div class="form-group">
				<label>月支付</label>
				<input name="monthpay" type="number" class="form-control">
			</div>
			<div class="form-group">
				<label>结算日</label>
				<input name="settledate" type="date" class="form-control date-picker" />
			</div>
			<div class="form-group">
				<label>摘要</label>
				<input name="memo" type="text"
					class="form-control">
			</div>
			<button type="submit" class="btn btn-primary">添加</button>
			<a class="btn  btn-dark" th:href="@{/liabilities?statu=}" role="button">取消</a>
		</form>
		<script>
			var defaultDate = document.querySelectorAll('.date-picker');
            for (var i = 0; i < defaultDate.length; i++) {
                defaultDate[i].valueAsDate = new Date();
            }
		</script>
	</body>